//
//  SSPoisonWord.m
//  Investigation Catalyst
//
//  Created by Tobias Haughton on Tue Jun 08 2004.
//  Copyright (c) 2004 Starline Software Ltd. All rights reserved.
//

#import "SSPoisonWord.h"


@implementation SSPoisonWord

- (id)initWithPoisonWord:(NSString *)word warningMessage:(NSString *)warning
{
   if (self = [super init]) {
      [self setPoisonWord:word];
      [self setWarningMessage:warning];
   }
   return self;
}


- (NSString *)poisonWord
{
   return poisonWord;
}

- (NSString *)warningMessage
{
   return warningMessage;
}

- (void)setPoisonWord:(NSString *)string
{
   [string retain];
   [poisonWord release];
   poisonWord = string;
}

- (void)setWarningMessage:(NSString *)string
{
   [string retain];
   [warningMessage release];
   warningMessage = string;
}

//*************************
- (void)encodeWithCoder:(NSCoder *)coder
{
   [coder encodeObject:poisonWord forKey:@"poisonWord"];
   [coder encodeObject:warningMessage forKey:@"warningMessage"];
}

- (id)initWithCoder:(NSCoder *)coder
{
   if(self = [super init]) {
      [self setPoisonWord:[coder decodeObjectForKey:@"poisonWord"]];
      [self setWarningMessage:[coder decodeObjectForKey:@"warningMessage"]];
   }
   return self;
}

//*************************
- (void)dealloc
{
   [poisonWord release];
   [warningMessage release];
   [super dealloc];
}

@end
